package com.woniuxy.web;

import com.woniuxy.pojo.Person;
import com.woniuxy.pojo.Person3;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;

@Controller
public class WanYiXia {
    @GetMapping("/qwe/{id}")
    public String findOne(@PathVariable("id")int id){
        System.out.println(id);
        return "redirect:../index.jsp";
    }

    @GetMapping("/qwe/{id}/{id2}")
    public String findTwo(@PathVariable("id")int id, @PathVariable("id2")String id2){
        System.out.println(id+"..."+id2);
        return "redirect:../../index.jsp";
    }

    @PutMapping("/qwe")
    public String qweqq(Person person){
        System.out.println("我是put"+person);
        return "redirect:index.jsp";
    }
    @PostMapping("/qwe")
    public String qweq(@RequestBody Person person){
        System.out.println("我是post"+person);
        return "redirect:index.jsp";
    }
    @PutMapping("/qwe/{id}")
    public String qweqqq(@PathVariable("id") String s){
        System.out.println("我是put"+s);
        return "redirect:../index.jsp";
    }
}
